﻿@model CustomerNavigationModel           
@using SpotsHub.Gateway.Models.Customer;

<div class="my-hub-navigation">
    <div class="navigation-content">
        <h2 class="section-title">@T("Account.MyAccount")</h2>
        <ul class="customer-links">
            @{
                Model.HideReturnRequests = false;
                Model.HideTracking = false;
            }
            @Html.Widget("account_navigation_before")
            @if (!Model.HideInfo)
            {
                <li class="dashboard @if (Model.SelectedTab == CustomerNavigationEnum.Info)
            {<text>active</text>}
            else
            {<text>inactive</text>}"><a href="@Url.RouteUrl("CustomerInfo")"><img src="~/Content/images/menu-dashboard.png" alt="Dashboard" /> @T("Account.Dashboard")</a></li>
            }
            @if (!Model.HideShopping)
            {
                <li class="shopping expand-menu @if (Model.SelectedTab == CustomerNavigationEnum.Shopping || Model.SelectedTab == CustomerNavigationEnum.Orders || Model.SelectedTab == CustomerNavigationEnum.ReturnRequests) {<text>has-active</text> }">
                    <span><img src="~/Content/images/menu-shopping.png" alt="Shopping" /> Shopping</span>
                    <div class="expandable-menu">
                        <ul>
                            <li class="@if (Model.SelectedTab == CustomerNavigationEnum.Shopping)
                        {<text>active</text>}
                        else
                        {<text>inactive</text>}"><a href="@Url.RouteUrl("HomePage")"><i class="fa fa-gift"></i>&nbsp;&nbsp;Go Shopping</a></li>

                            @if (!Model.HideOrders)
                            {
                                <li class="@if (Model.SelectedTab == CustomerNavigationEnum.Orders)
                            {<text>active</text>}
                            else
                            {<text>inactive</text>}"><a href="@Url.RouteUrl("CustomerOrders")"><i class="fa fa-clipboard fa-fw"></i>&nbsp;&nbsp;@*@T("Account.CustomerOrders")*@Shopping History</a></li>
                            }

                            @if (!Model.HideReturnRequests)
                            {
                                <li class="@if (Model.SelectedTab == CustomerNavigationEnum.ReturnRequests)
                            {<text>active</text>}
                            else
                            {<text>inactive</text>}"><a href="@Url.RouteUrl("CustomerReturnRequests")"><i class="fa fa-reply"></i>&nbsp;&nbsp;@T("Account.CustomerReturnRequests")</a></li>
                            }
                        </ul>
                    </div>
                </li>
            }
            @if (!Model.HideShipping)
            {
                <li class="shipping expand-menu @if (Model.SelectedTab == CustomerNavigationEnum.Shipping || Model.SelectedTab == CustomerNavigationEnum.Tracking || Model.SelectedTab == CustomerNavigationEnum.Invoices) { <text>has-active</text>}">
                    <span><img src="~/Content/images/menu-shipping.png" alt="Shipping" /> Shipping</span>
                    <div class="expandable-menu">
                        <ul>
                            <li class="@if (Model.SelectedTab == CustomerNavigationEnum.Shipping)
                        {<text>active</text>}
                        else
                        {<text>inactive</text>}"><a href="@Url.Action("Index", "Order", new { area = "Logistics" })"><i class="fa fa-paper-plane-o"></i>&nbsp;&nbsp;Place Shipment Order</a></li>

                            @if (!Model.HideTracking)
                            {
                                <li class="@if (Model.SelectedTab == CustomerNavigationEnum.Tracking)
                            {<text>active</text>}
                            else
                            {<text>inactive</text>}"><a href="@Url.Action("Tracking", "Customer")"><i class="fa fa-crosshairs"></i>&nbsp;&nbsp;@T("Account.CustomerTracking")</a></li>
                            }
                            @*@if (!Model.HideCalculateCost)
                            {
                                <li class="@if (Model.SelectedTab == CustomerNavigationEnum.CalculateCost)
                            {<text>active</text>}
                            else
                            {<text>inactive</text>}"><a href="@Url.Action("CalculateRate", "Customer")"><i class="fa fa-calculator"></i>&nbsp;&nbsp;Calculate Shipment Cost</a></li>
                            }*@
                            @if (!Model.HideInvoices)
                            {
                                <li class="invoices @if (Model.SelectedTab == CustomerNavigationEnum.Invoices)
                                    {<text>active</text>}
                                    else
                                    {<text>inactive</text>}"><a href="@Url.RouteUrl("CustomerInvoices")">&nbsp;&nbsp;@T("Account.CustomerInvoices")</a></li>
                            }
                        </ul>
                    </div>
                </li>
            }
            
            @if (!Model.HideMembership || !Model.HideChangePassword || !Model.HidePasswordRecovery)
            {
                <li class="account expand-menu @if(Model.SelectedTab == CustomerNavigationEnum.ChangePassword){<text>has-active</text>}">
                    <span><img src="~/Content/images/menu-account.png" alt="Account" /> Account</span>
                    <div class="expandable-menu">
                        <ul>
                            @*@if (!Model.HideMembership)
                        {
                            <li class="@if (Model.SelectedTab == CustomerNavigationEnum.Membership)
                            {<text>active</text>}
                            else
                            {<text>inactive</text>}"><a href="@Url.RouteUrl("CustomerMembership")">&nbsp;@T("Account.Membership")</a></li>
                        }*@
                            @if (!Model.HideChangePassword)
                            {
                                <li class="@if (Model.SelectedTab == CustomerNavigationEnum.ChangePassword)
                                {<text>active</text>}
                                else
                                {<text>inactive</text>}"><a href="@Url.RouteUrl("CustomerChangePassword")"><i class="fa fa-key fa-fw"></i>&nbsp;&nbsp;@T("Account.ChangePassword")</a></li>
                            }
                            @if (!Model.HidePasswordRecovery)
                            {
                                <li class="@if (Model.SelectedTab == CustomerNavigationEnum.PasswordRecovery)
                                {<text>active</text>}
                                else
                                {<text>inactive</text>}"><a href="@Url.RouteUrl("CustomerChangePassword")"><i class="fa fa-key fa-fw"></i>&nbsp;&nbsp;Password Recovery</a></li>
                            }
                        </ul>
                    </div>
                </li>
            }
            @if (!Model.HideAddresses)
            {
                <li class="addresses @if (Model.SelectedTab == CustomerNavigationEnum.Addresses)
                {<text>active</text>}
                else
                {<text>inactive</text>}"><a href="@Url.RouteUrl("CustomerAddresses")"><img src="~/Content/images/menu-addresses.png" alt="Addresses" /> @T("Account.CustomerAddresses")</a></li>
            }
            @if (!Model.HideSettings)
            {
                <li class="settings @if (Model.SelectedTab == CustomerNavigationEnum.Settings)
                {<text>active</text>}
                else
                {<text>inactive</text>}"><a href="@Url.RouteUrl("CustomerSettings")"><img src="~/Content/images/menu-settings.png" alt="Settings" /> Settings&nbsp; &nbsp;</a></li>
            }
            @*
            @if (!Model.HideChangePassword)
            {
                <li class="@if (Model.SelectedTab == CustomerNavigationEnum.ChangePassword)
                {<text>active</text>}
                else
                {<text>inactive</text>}"><a href="@Url.RouteUrl("CustomerChangePassword")"><i class="fa fa-key fa-fw"></i>&nbsp;&nbsp;@T("Account.ChangePassword")&nbsp; &nbsp;<i class="fa fa-angle-double-right"></i></a></li>
            }

            @if (!Model.HideEmailPreference)
            {
                <li class="@if (Model.SelectedTab == CustomerNavigationEnum.EmailPreference)
                    {<text>active</text>}
                    else
                    {<text>inactive</text>}"><a href="@Url.RouteUrl("CustomerEmailPreference")"><i class="fa fa-envelope-o fa-fw"></i>&nbsp;&nbsp;@T("Account.CustomerEmailPreference")&nbsp;&nbsp;<i class="fa fa-angle-double-right"></i></a></li>
            }

            @if (!Model.HideDownloadableProducts)
            {
                <li class="@if (Model.SelectedTab == CustomerNavigationEnum.DownloadableProducts)
                                                                                    {<text>active</text>}
                                                                                    else
                                                                                    {<text>inactive</text>}"><a href="@Url.RouteUrl("CustomerDownloadableProducts")">@T("Account.DownloadableProducts")</a></li>
            }
            @if (!Model.HideBackInStockSubscriptions)
            {
                <li class="@if (Model.SelectedTab == CustomerNavigationEnum.BackInStockSubscriptions)
                                                                                    {<text>active</text>}
                                                                                    else
                                                                                    {<text>inactive</text>}"><a href="@Url.RouteUrl("CustomerBackInStockSubscriptions")">@T("Account.BackInStockSubscriptions")</a></li>
            }
            @if (!Model.HideRewardPoints)
            {
                <li class="@if (Model.SelectedTab == CustomerNavigationEnum.RewardPoints)
                                                                            {<text>active</text>}
                                                                            else
                                                                            {<text>inactive</text>}"><a href="@Url.RouteUrl("CustomerRewardPoints")">@T("Account.RewardPoints")</a></li>
            }
            @if (!Model.HideAvatar)
            {
                <li class="@if (Model.SelectedTab == CustomerNavigationEnum.Avatar)
                                                                        {<text>active</text>}
                                                                        else
                                                                        {<text>inactive</text>}"><a href="@Url.RouteUrl("CustomerAvatar")">@T("Account.Avatar")</a></li>
            }
            @if (!Model.HideForumSubscriptions)
            {
                <li class="@if (Model.SelectedTab == CustomerNavigationEnum.ForumSubscriptions)
                                                                                    {<text>active</text>}
                                                                                    else
                                                                                    {<text>inactive</text>}"><a href="@Url.RouteUrl("CustomerForumSubscriptions")">@T("Account.ForumSubscriptions")</a></li>
            }
            *@
            @Html.Widget("account_navigation_after")

        </ul>
    </div>
    <div class="navigation-hover-bg"></div>
</div>